package com.hp.gxw.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hp.gxw.entity.SysDept;
import com.hp.gxw.mapper.SysDeptMapper;
import com.hp.gxw.service.ISysDeptService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author huangping
 * @since 2020-03-12
 */
@Service
public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> implements ISysDeptService {

	@Override
	public List<SysDept> selectInfoList(Wrapper<SysDept> ew) {
		return list(ew);
	}

	@Override
	public long selectInfoCount(Wrapper<SysDept> ew) {
		return count(ew);
	}

	@Override
	public SysDept selectInfo(Wrapper<SysDept> ew) {
		return getOne(ew);
	}

	@Override
	public void add(SysDept sysDept) throws Exception {
		save(sysDept);
	}

	@Override
	public void edit(SysDept sysDept) throws Exception {
		updateById(sysDept);
	}

	@Override
	public void delete(Wrapper<SysDept> ew) throws Exception {
		remove(ew);
	}
}